package org.example.day20240904.Scott;

public class Scott implements Comparable<Scott>{
    Integer no;
    String name;
    String job;
    Integer mgr;
    String hireDate;
    Double sal;
    Double comm;
    Integer deptNo;

    public Scott(Integer no
            , String name
            , String job
            , Integer mgr
            , String hireDate
            , Double sal
            , Double comm
            , Integer deptNo) {
        this.no = no;
        this.name = name;
        this.job = job;
        this.mgr = mgr;
        this.hireDate = hireDate;
        this.sal = sal;
        this.comm = comm;
        this.deptNo = deptNo;
    }

    @Override
    public int compareTo(Scott o) {
        return (int)(this.sal - o.sal);
    }
}
